program RandomProxy;

uses
	CRT, HTTPRequest, SysUtils;

function GetInt(var val: integer; prompt: string): boolean;
var
	temp: string;
begin
	writeln(prompt);
	readln(temp);
	if TryStrToInt(temp, val) then result := true
	else result := false;
end;

procedure Main;
var
	times, min, max: integer;
	returnedstr: string;
begin
	ClrScr;
	repeat
	until GetInt(times, 'How many numbers would you like to pick?');
	repeat
	until GetInt(min, 'What is the lowest number?');
	repeat
	until GetInt(max, 'What is the highest number?');
	write(GetHTTPResult('random.org', '/integers/?num='+IntToStr(times)+'&min='+IntToStr(min)+'&max='+IntToStr(max)+'&col=1&base=10&format=plain&rnd=new'));
end;

begin
	Main;
end.